package com.example.aotdemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService6 {

    @Autowired
    private UserDao userDao;

    @Transactional
    public void updateUserInfo(){
//        user.setId("222");
//        user.setUname("user1");
//        user.setGengder("男");
//        userDao.insertUser(user);
        int i = 1/0;
    }

    @Transactional
    public void updateUser(User user){
        user.setId("223");
        user.setUname("user2");
        user.setGengder("女");
//        updateUserInfo(user);

    }
}
